Remove WM_SYNCPAINT message handler
authorLuca Bacci <luca.bacci982@gmail.com>
Tue, 14 Dec 2021 17:32:51 +0000 (18:32 +0100)
committerLuca Bacci <luca.bacci982@gmail.com>
Sun, 2 Jan 2022 17:42:31 +0000 (18:42 +0100)
It was added to work around what seemed to be an OS or graphics
driver issue on Windows XP. The issue was not reproducible on
Windows Vista anyway.

References:
* https://bugzilla.gnome.org/show_bug.cgi?id=153567
* https://gitlab.gnome.org/GNOME/gtk/-/commit/c8fef535
* https://devblogs.microsoft.com/oldnewthing/20120723-00/?p=7073

gdk/win32/gdkevents-win32.c

index 6327cca1c2cc6e473966970cec097761f2554212..bc7590aa1322496fe479701a9c681949cf17e128 100644 (file)
@@ -157,7 +157,6 @@ static HKL latin_locale = NULL;
 
 static gboolean in_ime_composition = FALSE;
 static UINT     modal_timer;
-static UINT     sync_timer = 0;
 
 static int debug_indent = 0;
 
@@ -1453,23 +1452,6 @@ _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind)
     }
 }
 
-static VOID CALLBACK
-sync_timer_proc (HWND     hwnd,
-                UINT     msg,
-                UINT_PTR id,
-                DWORD    time)
-{
-  MSG message;
-  if (PeekMessageW (&message, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE))
-    {
-      return;
-    }
-
-  RedrawWindow (hwnd, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ALLCHILDREN);
-
-  KillTimer (hwnd, sync_timer);
-}
-
 static gboolean
 handle_nchittest (HWND hwnd,
                   GdkSurface *window,
@@ -2854,12 +2836,6 @@ gdk_event_translate (MSG *msg,
       *ret_valp = 1;
       break;
 
-    case WM_SYNCPAINT:
-      sync_timer = SetTimer (GDK_SURFACE_HWND (window),
-                            1,
-                            200, sync_timer_proc);
-      break;
-
     case WM_PAINT:
       handle_wm_paint (msg, window);
       break;